package com.ash.android_adk_demo

import android.content.Context
import android.widget.Toast
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext

fun Context.showToast(msg:String){
    Config.showToast(this,msg)
}

object Config{
    fun showToast(context: Context,msg:String){
        GlobalScope.launch {
            withContext(
                Dispatchers.Main
            ) {
                Toast.makeText(context,msg,Toast.LENGTH_SHORT).show()
            }
        }
    }
}